package com.art.coconut.example.model;

import com.art.coconut.annotation.*;
import com.art.coconut.enums.PropertyTypeEnum;
import lombok.Data;

import java.util.List;

@EntityTag(value = "BUSINESS_DETAIL")
@Data
public class BusinessDetail {
    @UnionId
    @PropertyField("明细ID")
    private String id;
    @PropertyField("业务基本信息ID")
    private String bizId;
    @PropertyField("明细描述")
    private String desc;
    @CollectionFlag(value = PropertyTypeEnum.LIST_TYPE)
    private List<Employee> employeeList;


    public static BusinessDetail build(String id, String bizId, String desc){
        BusinessDetail businessDetail = new BusinessDetail();
        businessDetail.setId(id);
        businessDetail.setBizId(bizId);
        businessDetail.setDesc(desc);
        return businessDetail;
    }
}
